﻿using Microsoft.Practices.Unity;
using SmartFront.Toolkit.Core;

namespace SmartFront.Toolkit.ActionFramework
{
    /// <summary>
    /// A dependency injection factory for creating actions.  Factory will also create
    /// wcf proxies for <see cref="SmartFront.Toolkit.ActionFramework.ServiceAction&lt;TProxy,TResult&gt;"/>.
    /// </summary>
    /// <typeparam name="T">Type type of the action.  This is typically a class which
    /// derives from <see cref="SmartFront.Toolkit.ActionFramework.ServiceAction&lt;TProxy,TResult&gt;"/></typeparam>
    public class ActionFactory<T>
        : DependencyInjectionFactory<ActionFactory<T>, T>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ActionFactory&lt;T&gt;"/> class.
        /// </summary>
        public ActionFactory()
            : base(UnityWrapper.Default) {}

        /// <summary>
        /// Configurations the override.
        /// </summary>
        /// <returns></returns>
        protected override IUnityContainerExtensionConfigurator ConfigurationOverride()
        {
            return null;
        }
    }
}